package com.zhishu.cli.command;

import cn.hutool.core.util.ReflectUtil;
import com.zhishu.model.MainTemplateConfig;
import picocli.CommandLine;

import java.lang.reflect.Field;

/**
 * @Author: 止束
 * @Version: 1.0
 * @DateTime: 2025/1/9 18:01
 * @Description:
 */
@CommandLine.Command(name = "config", mixinStandardHelpOptions = true)
public class ConfigCommand implements Runnable {
    @Override
    public void run() {
        //利用反射拿取数据模型的信息
        Field[] fields = ReflectUtil.getFields(MainTemplateConfig.class);
        for (Field field : fields) {
            System.out.println("字段类型: " + field.getType());
            System.out.println("字段名称: " + field.getName());
        }
    }
}
